package com.cloudbroker.bcs.platform.ltb.bizapi.constants.status;

public enum ClientAccountsStatus {
    
    REGISTERED(0, "已注册"),
    
    APPLICATION(1, "已申请"),
    
    FUND_ACCOUNT_OPEN(2, "资金账号已开通"),
    
    COMPLETE(3, "已完成"),
    
    ;

    
    private final int val;
    
    private final String description;
    
    private String toString;
    
    private ClientAccountsStatus(int val, String description) {
        this.val = val;
        this.description = description;
    }
    
    public int getVal() {
        return val;
    }
    
    public String getDescription() {
        return description;
    }
    
    public static String getDescription(int val) {
        for (ClientAccountsStatus s : ClientAccountsStatus.values()) {
            if (s.getVal() == val) {
                return s.getDescription();
            }
        }
        return "";
    }
    
    @Override
    public String toString() {
        if (null == toString) {
            toString = new StringBuilder().append("ClientMsgStatus[").append(val).append(':').append(description)
                    .append(']').toString();
        }
        return toString;
    }
    
}
